import request from '@/utils/request'

// 查询仪管理列表
export function listNyMeterManagement(query) {
  return request({
    url: '/energy/nyMeterManagement/list',
    method: 'get',
    params: query
  })
}

// 查询仪管理详细
export function getNyMeterManagement(id) {
  return request({
    url: '/energy/nyMeterManagement/' + id,
    method: 'get'
  })
}


// 计算私表汇总及差额
export function getComputeManagement(id) {
  return request({
    url: '/energy/nyMeterManagement/compute/' + id,
    method: 'get'
  })
}

// 新增仪管理
export function addNyMeterManagement(data) {
  return request({
    url: '/energy/nyMeterManagement',
    method: 'post',
    data: data
  })
}

// 修改仪管理
export function updateNyMeterManagement(data) {
  return request({
    url: '/energy/nyMeterManagement',
    method: 'put',
    data: data
  })
}

// 删除仪管理
export function delNyMeterManagement(id) {
  return request({
    url: '/energy/nyMeterManagement/' + id,
    method: 'delete'
  })
}

export function shareNyMeterManagement(id){
  return request({
    url: '/energy/nyMeterManagement/share/' + id,
    method: 'get'
  })
}
